import request from "@/utils/request";
import { param } from "@/utils";

export const getList = (query, data) => {
    return request({
        url: `/finance/receiptRecord/page?${param(query)}`,
        method: 'post',
        data
    })
}
export const edit = (data) => {
    return request({
        url: `/finance/receiptRecord/adjust`,
        method: 'post',
        data
    })
}

/**
 * 获取审批表单模型/数据/审批记录
 */
export const approvalForm = (taskId) => {
    return request({
        url: `/process/instance/progress/${taskId}/undefined`,
    });
};

/**
 * 审批
 */
export const handlerTask = (data) => {
    return request({
        url: `/process/task/handler`,
        method: 'post',
        data
    });
};
/**
 * 获取审批参数
 */
export const getAudit=(instanceId)=>{
    return request({
        url:`/process/task/getUserTodoDetail/${instanceId}`,
    })
}

/**
 * 修改流水凭证
 */
export const editReceiptImg = (data) => {
    return request({
        url: `/finance/receiptRecord/updateRecord`,
        method: 'post',
        data
    })
}
/**
 * 导出收支流水
 */
export const exportReceipt = (data) => {
    return request({
        url: `/finance/excel/exportRecord`,
        method: 'post',
        data,
        responseType: 'blob'
    })
}

/**
 * 批量记账
 */
export const batchRecord = (data) => {
    return request({
        url: `/finance/receiptRecord/batchTallyStatus`,
        method: 'post',
        data
    })
}